@import 'components/normalize';

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

//html,
//body {
//  width                             : 100%;
//  height                            : 100%;
//  margin                            : 0;
//  padding                           : 0;
//}

html {
    font-size: 100px;
}

body {
    //position                        : relative;
    font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif;
    font-weight: 300;
    box-sizing: border-box;
    min-width: 320px;
    max-width: 640px;
    margin: 0 auto;
    //overflow                        : hidden;
    background-color: #f7f7f7;
    font-size: .16rem;
}

.overflow-hidden {
    position: fixed;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

img {
    width: 100%;
}

$white: #fff;
$back: #000;
$backgroundColor: #f7f7f7;
$primaryColor: #19232b;
$lightHighColor: #eb6100;
$primaryFontColor: #3d3d3d;
$secondFontColor: #b5b5b6;
$lineColor: #e2e2e2;
$navbarBackground: $primaryColor;
$navbarHeight: 46px;
$toolbarHeight: 54px;

.navbar {
    display: block;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: $navbarBackground;
    overflow: hidden;
    z-index: 100;
    .navbar-inner {
        display: flex;
        position: relative;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: $navbarHeight;
        margin: 0 auto;
        color: $secondFontColor;
        .logo {
            font-size: 0;
            width: 120px;
        }
        .title {
            font-size: 18px;
        }
        .fa {
            position: absolute;
            line-height: $navbarHeight;
        }
        .back {
            left: 15px;
            font-size: 35px;
        }
        .menu {
            padding: 0 .15rem;
            right: 0;
            font-size: 24px;
        }
        .btn-r {
            position: absolute;
            right: 10px;
            top: 10px;
        }
        .btn {
            display: block;
            border: 1px solid $lineColor;
            color: $lineColor;
            padding: 0 10px;
            font-size: 14px;
            line-height: 26px;
            height: 26px;
            border-radius: 4px;
        }
    }
}

.toolbar {
    font-size: 16px;
    position: fixed;
    left: 0;
    bottom: 0;
    right: 0;
    display: flex;
    height: $toolbarHeight;
    background-color: $primaryColor;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    .item {
        display: block;
        flex-grow: 1;
        text-align: center;
        color: $secondFontColor;
        font-weight: bold;
        &.active {
            color: $lightHighColor;
        }
    }
    .fa {
        font-size: 30px;
        vertical-align: sub;
    }
    .fa-search {
        padding: 16px;
        font-size: 24px;
        color: $white;
        background-color: $lightHighColor;
        margin-top: -10px;
        border-radius: 50%;
        border: 2px solid $primaryColor;
    }
}

#wrapper {
    position: absolute;
    z-index: 1;
    top: 0px;
    bottom: 0px;
    left: 0;
    width: 100%;
    background: #ccc;
    overflow: hidden;
}

.view {
    padding: $navbarHeight 0 $toolbarHeight;
    background-color: $backgroundColor;
    overflow: hidden;
}

.tab-block-btn-group {
    display: flex;
    width: 100%;
    padding: .08rem .15rem;
    justify-content: space-around;
    background-color: $white;
    .btn {
        display: block;
        border: 1px solid #c0c0c0;
        height: .34rem;
        line-height: .34rem;
        text-align: center;
        flex-grow: 1;
        color: $primaryFontColor;
        margin-left: -1px;
        &:first-child {
            border-top-left-radius: 6px;
            border-bottom-left-radius: 6px;
        }
        &:last-child {
            border-top-right-radius: 6px;
            border-bottom-right-radius: 6px;
        }
        &.active {
            border-color: $lightHighColor;
            background-color: $lightHighColor;
            color: $white;
            & + .btn {
                border-left-color: $lightHighColor;
            }
        }
    }
}

.load-more-block {
    border: 1px solid $lineColor;
    text-align: center;
    font-size: .14rem;
    padding: 1em 0;
    margin: .08rem;
    color: #727171;
    background-color: $white;
}

.qmh-header {
    display: flex;
    align-items: flex-start;
    padding: .1rem .08rem;
    border-bottom: 1px solid $lineColor;
    position: relative;
    margin-bottom: -1px;
    background-color: $white;
    .logo {
        box-sizing: content-box;
        width: .62rem;
        padding: .1rem;
        margin-right: .08rem;
        border: 1px solid $lineColor;
        font-size: 0;
        border-radius: 20px;
    }
    .desc {
        .name {
            color: #3d3d3d;
            font-size: .18rem;
            padding: .8em 0;
        }
        p {
            margin: 0;
            font-size: .14rem;
            color: #b5b5b6;
            .num {
                color: $lightHighColor;
            }
        }
    }
    .badge {
        position: absolute;
        right: .08rem;
        top: .08rem;
        background-color: #ffb11f;
        border-radius: 4px;
        color: #fff;
        font-size: 14px;
        padding: .2em .4em;
        border: 1px solid #e88815;
    }
    &.sub {
        border: 1px solid $lineColor;
        margin: 15px 8px;
    }
}

.card-wrap {
    background-color: $white;
    border: 1px solid $lineColor;
    margin: .15rem .08rem;
}

.card {
    margin-top: -.3rem;
    margin-left: -.08rem;
    padding: .08rem;
    overflow: hidden;
    font-size: 0;
    li {
        margin-top: .3rem;
        margin-left: .08rem;
        display: inline-block;
        font-size: .16rem;
    }
    .fans-thumb {
        position: relative;
        width: .9rem;
        font-size: .12rem;
        .badge {
            position: absolute;
            left: 6px;
            top: 0;
            color: $white;
            height: .36rem;
            font-size: .12rem;
            border-bottom: .03rem solid transparent;
            border-left: .08rem solid #5692ec;
            border-right: .08rem solid #5692ec;
            &.president {
                & ::before {
                    content: '会长';
                    position: absolute;
                    left: -.06rem;
                    top: .02rem;
                }
            }
            &.vice-president {
                height: .5rem;
                & ::before {
                    content: '副会长';
                    position: absolute;
                    left: -.06rem;
                    top: .02rem;
                }
            }
        }
        .sex {
            width: .18rem;
            height: .18rem;
            position: absolute;
            top: .06rem;
            right: .06rem;
            background-size: 100% 100%;
            &.sex-man {
                background-image: url('../images/sex-man.png');
            }
            &.sex-femen {
                background-image: url('../images/sex-femen.png');
            }
        }
    }
    .name {
        color: $secondFontColor;
        text-align: center;
    }
    .btn {
        font-size: .12rem;
        margin-top: .12rem;
        display: block;
        color: $white;
        background-color: $lightHighColor;
        padding: .5em 0;
        border-radius: 4px;
        text-align: center;
        border: 1px solid $lightHighColor;
        &.cancel {
            background-color: $white;
            color: $secondFontColor;
            border: 1px solid $lineColor;
        }
    }
    p {
        font-size: 10px;
    }
}

.block-row {
    background-color: $white;
    padding: 0 .08rem;
    height: $navbarHeight;
    line-height: $navbarHeight;
    border-top: 1px solid $lineColor;
    border-bottom: 1px solid $lineColor;
    margin-bottom: .15rem;
    color: #3d3d3d;
    font-size: .18rem;
    .title ::before {
        vertical-align: middle;
        margin-top: -.04rem;
        margin-right: .08rem;
        display: inline-block;
        content: ' ';
        width: .29rem;
        height: .29rem;
        background: url('../images/qmh-logo.png') no-repeat;
        background-size: 100% 100%;
    }
    .num {
        color: $lightHighColor;
    }
    .fa-angle-right {
        padding-top: .02rem;
        font-size: .35rem;
        color: $secondFontColor;
    }
}

.filters {
    background-color: $white;
    display: flex;
    margin: 0 .08rem;
    padding: .08rem;
    border: 1px solid $lineColor;
    &.filters-block {
        margin: .15rem .08rem;
    }
    .filter {
        border: 1px solid $lineColor;
        border-radius: 2em;
        margin-right: .1rem;
        position: relative;
        font-size: .14rem;
        .fa {
            position: absolute;
            right: 10px;
            top: .03rem;
        }
    }
    select {
        width: 100%;
        margin: 0;
        background: none;
        border: 1px solid transparent;
        outline: none;

        /* Remove select styling */
        appearance: none;
        -webkit-appearance: none;

        /* Font size must the 16px or larger to prevent iOS page zoom on focus */
        /* General select styles      : change as needed */
        font-weight: bold;
        color: #444;
        padding: .3em 1.8em .2em .8em;
    }
    & + .list {
        margin-top: -1px;
    }
}

.list {
    border: 1px solid $lineColor;
    margin: 0 .08rem;
    padding: 0 .08rem;
    background-color: $white;
    li {
        padding: .1rem 0 .15rem;
        border-bottom: 1px solid $lineColor;
        position: relative;
        & :last-child {
            border-bottom: 0;
        }
    }
    .author-info {
        display: flex;
        .author-thumb {
            width: .35rem;
            margin-right: .08rem;
        }
        .author-desc {
            .name {
                padding-top: .02rem;
                font-size: .14rem;
                color: #636363;
            }
            p {
                margin: .04rem 0 0;
                font-size: .11rem;
                color: #b5b5b6;
                span {
                    margin-right: 4px;
                }
                .time {
                    color: $lightHighColor;
                    margin-right: .16rem;
                }
            }
        }
    }
    .article {
        margin-top: .1rem;
        font-size: .14rem;
        .article-images {
            margin-top: .1rem;
            display: flex;
            a {
                display: block;
                flex-grow: 1;
                margin-left: .08rem;
                & :first-child {
                    margin-left: 0;
                }
            }
        }
    }
    .article-badge ::before {
        content: '';
        background-color: #e4007f;
        border-radius: 4px;
        font-weight: 400;
        padding: 2px;
        display: inline-block;
        color: $white;
        margin-right: .04rem;
    }
    .ding ::before {
        content: '顶';
        background-color: #e4007f;
    }
    .jing ::before {
        content: '精';
        background-color: #13ae67;
    }
    .experience-badge {
        background-color: $lightHighColor;
        display: inline-block;
        position: absolute;
        right: .1rem;
        top: .1rem;
        border-radius: .1rem;
        padding: 0 .1rem;
        color: $white;
        .fa {
            font-size: .14rem;
            margin-right: 4px;
        }
    }
}

#overwriteMark {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #000;;
    opacity: 0;
    z-index: 10;
    transition: all 300ms linear 200ms;
    &.show {
        display: block;
        opacity: .5;
        //transform                   : translate3d(0, 0, 0);
    }
}

.side-bar {
    padding-top: .3rem;
    position: fixed;
    right: -2.3rem;
    top: $navbarHeight;
    bottom: $toolbarHeight;
    background-color: $primaryColor;
    color: #c9caca;
    font-size: .16rem;
    z-index: 99;
    transition: all 200ms ease-in-out;
    &.show {
        //right                       : 0;
        transform: translate3d(-1.5rem, 0, 0);
        //backface-visibility         : hidden;
        //perspective                 : 1000;
    }
    .item {
        margin-left: .3rem;
        height: $navbarHeight;
        line-height: $navbarHeight;
        //border-bottom               : 1px solid #c9caca;
        width: 2rem;
        & ::before {
            content: ' ';
            display: inline-block;
            width: .3rem;
            height: .3rem;
            background-size: 100%;
            background-repeat: no-repeat;
            vertical-align: middle;
            margin-right: .1rem;
        }
    }
    .topic ::before {
        background-image: url('../images/sidebar/topic.png');
    }
    .fans ::before {
        background-image: url('../images/sidebar/fans.png');
    }
    .news ::before {
        background-image: url('../images/sidebar/news.png');
    }
    .video ::before {
        background-image: url('../images/sidebar/video.png');
    }
    .pic ::before {
        background-image: url('../images/sidebar/pic.png');
    }
    .infos ::before {
        background-image: url('../images/sidebar/infos.png');
        background-size: auto 90%;
        background-position: center 0;
    }
}

//  loading module
@keyframes bouncedelay {
    0%,
    80%,
    100% {
        transform: scale(.0);
    }
    40% {
        transform: scale(1.0);
    }
}

#loading {
    .spinner {
        margin: .18rem auto;
        width: 20px;
        height: 20px;
        position: relative;
    }

    .container1 > div,
    .container2 > div,
    .container3 > div {
        width: 6px;
        height: 6px;
        background-color: #333;
        border-radius: 100%;
        position: absolute;
        animation: bouncedelay 1.2s infinite ease-in-out;
        /* Prevent first frame from flickering when animation starts */
        -webkit-animation-fill-mode: both;
        animation-fill-mode: both;
    }

    .spinner .spinner-container {
        position: absolute;
        width: 100%;
        height: 100%;
    }

    .container2 {
        transform: rotateZ(45deg);
    }

    .container3 {
        transform: rotateZ(90deg);
    }

    .circle1 {
        top: 0;
        left: 0;
    }
    .circle2 {
        top: 0;
        right: 0;
    }
    .circle3 {
        right: 0;
        bottom: 0;
    }
    .circle4 {
        left: 0;
        bottom: 0;
    }

    .container2 .circle1 {
        animation-delay: -1.1s;
    }

    .container3 .circle1 {
        animation-delay: -1.0s;
    }

    .container1 .circle2 {
        animation-delay: -.9s;
    }

    .container2 .circle2 {
        animation-delay: -.8s;
    }

    .container3 .circle2 {
        animation-delay: -.7s;
    }

    .container1 .circle3 {
        animation-delay: -.6s;
    }

    .container2 .circle3 {
        animation-delay: -.5s;
    }

    .container3 .circle3 {
        animation-delay: -.4s;
    }

    .container1 .circle4 {
        animation-delay: -.3s;
    }

    .container2 .circle4 {
        animation-delay: -.2s;
    }

    .container3 .circle4 {
        animation-delay: -.1s;
    }
}

.waterfall {
    margin: 0 .08rem;
    .item {
        width: 1.43rem;
        margin-bottom: .15rem;
        .image {
            font-size: 0;
        }
        .title {
            font-size: 14px;
            border: 1px solid $lineColor;
            background-color: $white;
            padding: .08rem .05rem;
        }
    }
}

.avatar img {
    display: block;
    margin: .45rem auto .3rem;
    width: .85rem;
    height: .85rem;
}

.input-block {
    display: block;
    margin: 0 auto .08rem;
    padding: .08rem;
    width: 2.5rem;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    color: $primaryFontColor;
}
